package cn.helios.controller;

import cn.helios.config.ProductFeignClient;
import cn.helios.domain.Product;
import cn.helios.service.IProductService;
import cn.helios.ulit.Ajaxresult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProductController {

    @Autowired
    private IProductService productService;

    @Autowired
    private ProductFeignClient productFeignClient;
    @PostMapping("/add")
    public Ajaxresult add(@RequestBody Product product){
      return  productService.add(product);
    }
}
